package face.pay.constant;

/**
 * @Auther: zkj
 * @Date: 2019/9/11 15:39
 * @Description:
 */
public class OrderStatus {

    /**
     * 成功
     */
    public static  String SUCCESS = "SUCCESS";

    /**
     * 转入退款
     */
    public static  String REFUND = "REFUND";

    /**
     * 已关闭
     */
    public static  String CLOSED = "CLOSED";

    /**
     * 已撤销(刷卡支付)
     */
    public static  String REVOKED = "REVOKED";

    /**
     * 支付中
     */
    public static  String USERPAYING = "USERPAYING";


    /**
     * 未支付
     */
    public static  String NOTPAY = "NOTPAY";


    public static  String PAYERROR = "PAYERROR";


    public static  String ERROR = "ERROR";



    public static String getStatus(Integer order_status){

        String  status =  OrderStatus.NOTPAY;
        if(new Integer(0).equals(order_status)){

            status =  OrderStatus.NOTPAY;

        }else if(new Integer(1).equals(order_status)){
            status =  OrderStatus.SUCCESS;

        }else if(new Integer(-1).equals(order_status)){
            status =  OrderStatus.PAYERROR;

        }else if(new Integer(-2).equals(order_status)){
            status =  OrderStatus.ERROR;

        }else if(new Integer(-3).equals(order_status)){
            status =  OrderStatus.REVOKED;

        }else if(new Integer(-4).equals(order_status)){
            status =  OrderStatus.CLOSED;

        }else if(new Integer(-5).equals(order_status)){
            status =  OrderStatus.REFUND;

        }
        return status;
    }




}
